DROP TABLE IF EXISTS jms_dm.dm_project_customer_taking_send_sign_info_dt ;
create EXTERNAL table jms_dm.dm_project_customer_taking_send_sign_info_dt
(
  `customer_uniname` string COMMENT '品牌客户简称',
  `customer_id` string COMMENT '品牌客户编码id',
  `customer_code` string COMMENT '品牌客户code JT开头',
  `scansitecode` string COMMENT '网点编码',
  `network_name` string COMMENT '网点名称',
  `subordinate_agent_code` string COMMENT '代理区编码',
  `subordinate_agent_name` string COMMENT '代理区名称',
  `franchisee_code` string COMMENT '加盟商编码',
  `franchisee_name` string COMMENT '加盟商名称',
  `billcode` string COMMENT '单号',
  `taking_time` timestamp COMMENT '揽收的扫描时间',
   send_time  timestamp COMMENT '发件的扫描时间',
  `is_send` tinyint COMMENT '是否发货',
  `sign_time` timestamp COMMENT '签收录入时间和出库扫描时间',
  `is_sign` tinyint COMMENT '是否签收',
  `is_difficult` tinyint COMMENT '是否是问题件',
  `difficult_lable` string COMMENT '问题件标签',
  `difficult_name` string COMMENT '问题件原因',
  is_refund tinyint COMMENT '是否退货',
  is_delete tinyint COMMENT '是否删除1未删除，2已删除'
)
comment '品牌客户指标监控-业务量监控和出港及时率中间表'
PARTITIONED BY (
  `dt` string COMMENT '时间分区')
STORED AS PARQUET
LOCATION '/dw/hive/jms_dm.db/external/dm_project_customer_taking_send_sign_info_dt'
TBLPROPERTIES (
        'discover.partitions' = 'false',
        'parquet.column.index.access' = 'true'
);

MSCK REPAIR TABLE jms_dm.dm_project_customer_taking_send_sign_info_dt;
